Skip to content

Fix documentation about $CFG->hooks_callback_overrides#1466

Merged
andrewnicols merged 2 commits intomoodle:mainfrom
abias:patch-1
Mar 18, 2026
Merged

Fix documentation about $CFG->hooks_callback_overrides#1466
andrewnicols merged 2 commits intomoodle:mainfrom
abias:patch-1

Conversation

@abias
Copy link
Copy Markdown
Contributor

@abias abias commented Nov 14, 2025

The given example for $CFG->hooks_callback_overrides did not work on Moodle 5.1

@netlify
Copy link
Copy Markdown

netlify bot commented Nov 14, 2025

Deploy Preview for moodledevdocs ready!

Name Link
🔨 Latest commit 8572df7
🔍 Latest deploy log https://app.netlify.com/projects/moodledevdocs/deploys/69ba32eaaa2d0c0008d9d75b
😎 Deploy Preview https://deploy-preview-1466--moodledevdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

abias and others added 2 commits March 18, 2026 13:04
The given example for $CFG->hooks_callback_overrides did not work on Moodle 5.1
Backports the fix from PR moodle#1466 to version-4.4, version-4.5, version-5.0,
and the main (current) docs.
Copilot AI review requested due to automatic review settings March 18, 2026 05:06
@andrewnicols andrewnicols added this pull request to the merge queue Mar 18, 2026
Merged via the queue into moodle:main with commit cbf7c6e Mar 18, 2026
5 of 6 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Hooks API documentation examples to use the correct callback class name for $CFG->hooks_callback_overrides, aligning the override example with the callback naming used in the hooks registration examples and fixing the non-working snippet on Moodle 5.1.

Changes:

  • Update the override example callback from test_otherplugin\\callbacks::... to test_otherplugin\\hook_callbacks::... in the Hooks API docs.
  • Apply the same correction across the main docs and the versioned docs for 4.4, 4.5, 5.0, and 5.1.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
versioned_docs/version-5.1/apis/core/hooks/index.md Fix override example callback class name.
versioned_docs/version-5.0/apis/core/hooks/index.md Fix override example callback class name.
versioned_docs/version-4.5/apis/core/hooks/index.md Fix override example callback class name.
versioned_docs/version-4.4/apis/core/hooks/index.md Fix override example callback class name.
docs/apis/core/hooks/index.md Fix override example callback class name.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants